<?php
include_once(_APP_PATH. "modules/controlls/controllers/params/params_field.php");
class ParamsFieldRadio extends ParamsField{

	public function PreparePostData($fieldPostData)
	{
		$fieldPostData = (string)$fieldPostData;
		
		$values = (array)$this->GetParam('values');
		if (!$values || !array_key_exists($fieldPostData, $values)) $fieldPostData = null;
		
		return $fieldPostData; 
	}

	public function PrepareOutData($fieldData)
	{
		return (string)$fieldData;
	}	
	
}